/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import java.util.List;
import javax.persistence.EntityManager;

/**
 *
 * @author Giannin
 */
public abstract class AbstractDAO<T> {
    
    public abstract void create(T registro, EntityManager em) throws Exception;
    
    public abstract void edit(T registro, EntityManager em) throws Exception;
    
    public abstract void delete(Integer registroId, EntityManager em) throws Exception;
    
    public abstract List<T> findAll(EntityManager em);
    
    public abstract List<T> find(int maxCant, int iniciaEn, EntityManager em);
    
    public abstract List<T> find(boolean all, int maxResults, int firstResult, EntityManager em);
    
    public abstract T findById(Integer id, EntityManager em);
    
}
